home *** CD-ROM | disk | FTP | other *** search
/ PC for Alla 2005 May / PC för Alla 0505.iso / fullversioner / realsoft3d / data1.cab / Scripting / scripts / js / real / code / r3impexp.js < prev    next >
Encoding:
JavaScript  |  2005-04-04  |  6.9 KB  |  240 lines

  1.  
  2. // JavaScript wrapper for r3impexp.h
  3. // Auto generated file, do not modify by hand
  4. // Copyright ⌐ 2004, Realsoft Graphics Oy
  5.  
  6. var R3_IMPORTEXPORT_H = 1;
  7. include("oops/r3root.js")
  8.  
  9.  
  10. var R3CLID_IMPORTEXPORT = 109;
  11.  
  12.  
  13.  
  14.  
  15. // Description: Save given geometric object to a file. This method is defined by the impexp
  16. //      base class but it is up to sub classes to implement this.
  17. // Returns: Boolean, FALSE cancels
  18. // p3: Object, geometric object to be saved    
  19.  
  20. R3IEM_WRITEOBJECTS = 109000;
  21.  
  22. function mR3IEM_WRITEOBJECTS(p3) {
  23.   return   DoA(this.r3obj, 109000, p3, R3TID_OBJECT, 0);
  24. }
  25.  
  26. // Description: Read geometric objects from file. It is up to sub classes to implement this
  27. //      method. Version 1: If replace is given, and the file to be read contains data,
  28. //      it is the responsibility of the object to clear the buffer.
  29. // Returns: Boolean, FALSE means error
  30. // p3: Boolean, replace. If true, clear the contents of the layer before reading objects.    
  31.  
  32. R3IEM_READOBJECTS = 109001;
  33.  
  34. function mR3IEM_READOBJECTS(p3) {
  35.   return   DoA(this.r3obj, 109001, p3, R3TID_BOOLEAN, 0);
  36. }
  37.  
  38. // Description: Used for defining hierarchical structure of the object tree. Begin level is sent for
  39. //      each level object to indicate that new hierarchy level is entered. It is up to
  40. //      the sub class to implement this methods
  41. // p3: Object, level object    
  42.  
  43. R3IEM_WRITEOBJECTSBEGINLEVEL = 109002;
  44.  
  45. function mR3IEM_WRITEOBJECTSBEGINLEVEL(p3) {
  46.   DoA(this.r3obj, 109002, p3, R3TID_OBJECT, 0);
  47. }
  48.  
  49. // Description: Used for defining hierarchical structure of the object tree. Sent after all sub objects
  50. //      in the level in question are written. It is up to the sub class to
  51. //      implement this methods
  52. // p3: Object, level object    
  53.  
  54. R3IEM_WRITEOBJECTSENDLEVEL = 109003;
  55.  
  56. function mR3IEM_WRITEOBJECTSENDLEVEL(p3) {
  57.   DoA(this.r3obj, 109003, p3, R3TID_OBJECT, 0);
  58. }
  59.  
  60. // Description: These two methods are used for reading/writing macros. It is up to the sub
  61. //      class to implement these. The macro object can be found using R3AppMacros(app) function. Use R3MCM_ENUMMACROS
  62. //      and R3MCM_ENUMBINDINGS methods to scan through and export macros.
  63.  
  64. R3IEM_READMACROS = 109005;
  65.  
  66. function mR3IEM_READMACROS() {
  67.   DoA(this.r3obj, 109005, 0, R3TID_INTEGER, 0);
  68. }
  69.  
  70. // Description: Start reading. It is up to the sub class to implement this method.
  71.  
  72. R3IEM_BEGINREAD = 109006;
  73.  
  74. function mR3IEM_BEGINREAD() {
  75.   DoA(this.r3obj, 109006, 0, R3TID_INTEGER, 0);
  76. }
  77.  
  78. // Description: End reading. It is up to the sub class to implement this method.
  79.  
  80. R3IEM_ENDREAD = 109007;
  81.  
  82. function mR3IEM_ENDREAD() {
  83.   DoA(this.r3obj, 109007, 0, R3TID_INTEGER, 0);
  84. }
  85.  
  86. // Description: Start writing session. It is up to sub classes to implement these.
  87.  
  88. R3IEM_BEGINWRITE = 109008;
  89.  
  90. function mR3IEM_BEGINWRITE() {
  91.   DoA(this.r3obj, 109008, 0, R3TID_INTEGER, 0);
  92. }
  93.  
  94. // Description: End writing session. It is up to sub classes to implement these.
  95.  
  96. R3IEM_ENDWRITE = 109009;
  97.  
  98. function mR3IEM_ENDWRITE() {
  99.   DoA(this.r3obj, 109009, 0, R3TID_INTEGER, 0);
  100. }
  101.  
  102. // Description: Read format specific options from the opened file and intialize format specific model.
  103. // p3: Object, format specific model to be initialized.    
  104.  
  105. R3IEM_READOPTIONS = 109010;
  106.  
  107. function mR3IEM_READOPTIONS(p3) {
  108.   DoA(this.r3obj, 109010, p3, R3TID_OBJECT, 0);
  109. }
  110.  
  111. // Description: See R3IEM_READOBJECTS, R3IEM_WRITEOBJECTS 
  112.  
  113. R3IEM_WRITEGRIDS = 109024;
  114.  
  115. function mR3IEM_WRITEGRIDS() {
  116.   DoA(this.r3obj, 109024, 0, R3TID_INTEGER, 0);
  117. }
  118.  
  119. // Description: Class method. Returns the file extension (.r3d, .dxf etc.)    * If the file format doesn't
  120. //      define any extension, NULL is returned.
  121. // Returns: String, extension
  122.  
  123. R3IECM_GETFILEEXTENSION = 109025;
  124.  
  125. function mR3IECM_GETFILEEXTENSION() {
  126.   return   DoA(this.r3obj, 109025, 0, R3TID_INTEGER, 0);
  127. }
  128.  
  129.  
  130.  
  131.  
  132. R3IEA_FileName = 109500;
  133. function SetR3IEA_FileName(value) {
  134.   R3Set(this.r3obj, R3IEA_FileName, value, R3TID_STRING, 0); 
  135. }
  136.  
  137. R3IEA_PrimLayer = 109501;
  138. function SetR3IEA_PrimLayer(value) {
  139.   R3Set(this.r3obj, R3IEA_PrimLayer, value, R3TID_OBJECT, 0); 
  140. }
  141.  
  142. function GetR3IEA_PrimLayer() {
  143.   return R3ToJS(R3Get(this.r3obj, R3IEA_PrimLayer, R3TID_OBJECT, 0)); 
  144. }
  145.  
  146. R3IEA_MaterialLayer = 109502;
  147. function SetR3IEA_MaterialLayer(value) {
  148.   R3Set(this.r3obj, R3IEA_MaterialLayer, value, R3TID_OBJECT, 0); 
  149. }
  150.  
  151. function GetR3IEA_MaterialLayer() {
  152.   return R3ToJS(R3Get(this.r3obj, R3IEA_MaterialLayer, R3TID_OBJECT, 0)); 
  153. }
  154.  
  155. R3IEA_Mode = 109503;
  156. function SetR3IEA_Mode(value) {
  157.   R3Set(this.r3obj, R3IEA_Mode, value, R3TID_INTEGER, 0); 
  158. }
  159.  
  160. function GetR3IEA_Mode() {
  161.   return R3Get(this.r3obj, R3IEA_Mode, R3TID_INTEGER, 0); 
  162. }
  163.  
  164. R3IEA_File = 109504;
  165. function GetR3IEA_File() {
  166.   return R3ToJS(R3Get(this.r3obj, R3IEA_File, R3TID_OBJECT, 0)); 
  167. }
  168.  
  169. R3IEA_Model = 109505;
  170. function SetR3IEA_Model(value) {
  171.   R3Set(this.r3obj, R3IEA_Model, value, R3TID_OBJECT, 0); 
  172. }
  173.  
  174. function GetR3IEA_Model() {
  175.   return R3ToJS(R3Get(this.r3obj, R3IEA_Model, R3TID_OBJECT, 0)); 
  176. }
  177.  
  178. var R3IEA_Binary = 109506; // Boolean
  179. var R3IEA_ProgressIndicator = 109507; // Object
  180. var R3IEA_OpenClose = 109508; // Boolean
  181. R3IEA_CurrentLayer = 109509;
  182. function SetR3IEA_CurrentLayer(value) {
  183.   R3Set(this.r3obj, R3IEA_CurrentLayer, value, R3TID_OBJECT, 0); 
  184. }
  185.  
  186. function GetR3IEA_CurrentLayer() {
  187.   return R3ToJS(R3Get(this.r3obj, R3IEA_CurrentLayer, R3TID_OBJECT, 0)); 
  188. }
  189.  
  190. R3IEA_SubLayer = 109510;
  191. function SetR3IEA_SubLayer(value) {
  192.   R3Set(this.r3obj, R3IEA_SubLayer, value, R3TID_OBJECT, 0); 
  193. }
  194.  
  195. function GetR3IEA_SubLayer() {
  196.   return R3ToJS(R3Get(this.r3obj, R3IEA_SubLayer, R3TID_OBJECT, 0)); 
  197. }
  198.  
  199. var R3IEMODE_WRITE = 0;
  200. var R3IEMODE_READ = 1;
  201.  
  202.  
  203. function r3Importexport () { 
  204.    this.base = r3God;
  205.    if(arguments.length) {
  206.       this.base(R3CLID_IMPORTEXPORT, arguments);
  207.    }
  208.    // Methods
  209.    this.WRITEOBJECTS=mR3IEM_WRITEOBJECTS;
  210.    this.READOBJECTS=mR3IEM_READOBJECTS;
  211.    this.WRITEOBJECTSBEGINLEVEL=mR3IEM_WRITEOBJECTSBEGINLEVEL;
  212.    this.WRITEOBJECTSENDLEVEL=mR3IEM_WRITEOBJECTSENDLEVEL;
  213.    this.READMACROS=mR3IEM_READMACROS;
  214.    this.BEGINREAD=mR3IEM_BEGINREAD;
  215.    this.ENDREAD=mR3IEM_ENDREAD;
  216.    this.BEGINWRITE=mR3IEM_BEGINWRITE;
  217.    this.ENDWRITE=mR3IEM_ENDWRITE;
  218.    this.READOPTIONS=mR3IEM_READOPTIONS;
  219.    this.WRITEGRIDS=mR3IEM_WRITEGRIDS;
  220.    this.GETFILEEXTENSION=mR3IECM_GETFILEEXTENSION;
  221.  
  222.    // Attributes
  223.    this.SetFileName=SetR3IEA_FileName;
  224.    this.GetPrimLayer=GetR3IEA_PrimLayer;
  225.    this.SetPrimLayer=SetR3IEA_PrimLayer;
  226.    this.GetMaterialLayer=GetR3IEA_MaterialLayer;
  227.    this.SetMaterialLayer=SetR3IEA_MaterialLayer;
  228.    this.GetMode=GetR3IEA_Mode;
  229.    this.SetMode=SetR3IEA_Mode;
  230.    this.GetFile=GetR3IEA_File;
  231.    this.GetModel=GetR3IEA_Model;
  232.    this.SetModel=SetR3IEA_Model;
  233.    this.GetCurrentLayer=GetR3IEA_CurrentLayer;
  234.    this.SetCurrentLayer=SetR3IEA_CurrentLayer;
  235.    this.GetSubLayer=GetR3IEA_SubLayer;
  236.    this.SetSubLayer=SetR3IEA_SubLayer;
  237. }
  238.  
  239. r3Importexport.prototype=new r3Root;
  240. // r3impexp.h_H